<template>
  <div class="common-layout">
    <el-container class="layout-container">
      <!-- 侧边栏 -->
      <el-aside  class="sidebar">
        
        <!-- <IndexNav :isCollapse="isCollapse"></IndexNav> -->
      </el-aside>
      <el-container>
            <el-header style="text-align: right; font-size: 12px;height: 80px;background-color: #c6e2ff;">
               <!-- 头部效果 -->
               <IndexHead  @change="isCollapse=!isCollapse"></IndexHead>
            </el-header>
            <el-main>
               <!-- <router-view></router-view>
                 -->
               <div>无权限</div>
            </el-main>
         </el-container>
    </el-container>
  </div>
</template>

<!-- <script setup>
import { HomeFilled, User } from '@element-plus/icons-vue'
import IndexHead from "./IndexHead.vue"
import IndexNav from './IndexNav.vue';
import { ref } from 'vue';
export default {
  name: 'Layout',
  components: {
    HomeFilled,
    User
  }
}

let isCollapse = ref(false)
</script> -->
<script setup>
// import { HomeFilled, User } from '@element-plus/icons-vue'
// import IndexNav from '../views/layout/IndexNav.vue'; 
// import { onMounted } from 'vue';
import IndexHead from '../views/layout/IndexHead.vue';
import { computed, ref } from 'vue';
// let isCollapse = ref(false)
// const asideWidth = computed(() => isCollapse.value ? '80px' : 'auto');
</script>

<style scoped>
.layout-container {
  height: 100vh;
  /* background-color: #264e7c; */
}

.sidebar {
  background-color: #304156;
  transition: width 0.3s;
}

.el-menu-vertical {
  border-right: none;
  height: 100%;
}
.submenu [class^="el-icon-"] {
  margin-right: 8px;
  width: 24px;
  text-align: center;
  font-size: 18px;
}

.header {
  background-color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  /* height: 60px; */
}

.header-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-content {
  padding: 20px;
  min-height: calc(100vh - 60px);
}
.el-main{
    padding: 0;
}
/* 响应式调整 */
@media screen and (max-width: 768px) {
  .sidebar {
    width: 64px !important;
  }
  
  .sidebar :deep(.el-submenu__title span) {
    display: none;
  }
  
  .sidebar :deep(.el-menu-item span) {
    display: none;
  }
}
</style>